from flask import Flask
import json

app = Flask(__name__)

with open('xiaoshuo.json' , 'r',encoding='utf-8') as file:
    data = json.load(file)

@app.route('/book/<book_name>')
def get_book_info(book_name):
    for i in data['result']['bookList']:
        if i['bookName'] == book_name:
            return book_name+'更新时间为：'+i['updateTime']

if __name__=='__main__':
    app.run(debug=True,host='127.0.0.1' , port=1234)